﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _001线性列表
{
    class Program
    {
        static void Main(string[] args)
        {
            //使用 List线性列表
            //List<int> data = new List<int>();

            Sequence<string> sequence = new Sequence<string>();
            sequence.Add("123");
            sequence.Add("456");
            sequence.Add("789");
            sequence.Add("246");
            sequence.Add("135");

            Console.WriteLine(sequence.GetEle(0));
            sequence.Insert("dsfasdfa",1);
            for (int i = 0; i < sequence.GetLength(); i++)
            {
                Console.Write(sequence[i] + "  ");
            }
            Console.WriteLine();
            sequence.Delete(3);
            for (int i = 0; i < sequence.GetLength(); i++)
            {
                Console.Write(sequence[i] + "  ");
            }
            Console.WriteLine(sequence.GetLength());

            Console.ReadKey();
        }
    }
}
